package Mode;

import Util.Constants.*;
import Util.Controller;
import Util.Game;

import java.util.Random;

/**
 * 随机生成可以行走的方向
 * */
public class RandomNonRevPacMan extends Controller<MOVE> {
    Random rnd=new Random();
    @Override
    public MOVE getMove(Game game, long timeDue) {
        MOVE[] possibleMoves=game.getPossibleMoves(game.getPacmanCurrentNodeIndex(),game.getPacmanLastMoveMade());		//set flag as false to prevent reversals

        return possibleMoves[rnd.nextInt(possibleMoves.length)];
    }
}
